package com.example.mapper;

import com.example.entity.Role;
import com.example.page.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author:tjf
 * @Description:
 */
public interface RoleMapper {
    List<Role> selectAllRoles();
    List<Role> selectRoleListByUserId(int userId);
    List<Integer> selectRoleIdByRoleName(List<String> roleName);
    int selectRoleCountByConditionForPagination(Role role);
    List<Role> selectRoleByConditionForPagination(@Param("role") Role role,
                                                  @Param("page") Page page);
    Role selectRoleByRoleName(String roleName);
    Role selectRoleByRoleCode(String roleCode);
    int insertRole(Role role);
    int updateRoleStateByRoleId(Role role);
    int deleteRoleByRoleId(int roleId);
    int updateRoleDescByRoleId(Role role);
}
